Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm workspacesを導入する #1602

Merged
merged 34 commits into from
Sep 13, 2024
Merged

Conversation

KentaHizume
Copy link
Contributor

@KentaHizume KentaHizume commented Aug 19, 2024

npm workspacesについて

  • dressca-frontend/直下のpackage.jsonで、ワークスペースを宣言します。
  "workspaces": [
    "customer"
  ]
  • ワークスペース名は、dressca-frontend/customer配下のpackage.jsonのnameと一致するようにします。
  "name": "customer",
  • package-lock.jsonは、dressca-frontend/直下に1つだけ作成され、この中に各ワークスペースが依存するパッケージ情報が記録されます。
  • dressca-frontend/customer配下には、依存するパッケージを指定するためのpackage-jsonが作成されますが、それを記録するためのpackage-lock.jsonは作成されません。
  • 使用する各パッケージのバージョンは、ワークスペースによって異なる可能性があるため、各ワークスペース配下のpackage.jsonで宣言します。

確認手順

デバッグ実行

  1. 空のフォルダにブランチをクローンする
    (既存のnode_modulesがない場所でテストするため)

  2. バックエンドから、Dressca.Webをスタートアッププロジェクトにして、デバッグ実行が正常に起動できること

アプリケーションの発行

  1. Dressca.Webをローカルに発行する
  2. mainブランチのDressca.Webをローカルに発行する
  3. 発行されるファイル数に差分がないこと
    (フロントエンドの資材は末尾に文字列が付加されるのでファイル名は一致しない)

@KentaHizume KentaHizume self-assigned this Aug 19, 2024
@KentaHizume KentaHizume added target: Dressca サンプルアプリケーションDresscaに関係がある CI/CD Github Actionsなどの修正 labels Aug 19, 2024
@KentaHizume KentaHizume added this to the v0.10 milestone Aug 19, 2024
@KentaHizume KentaHizume deleted the feature/npm-workspacesを導入する branch August 21, 2024 08:16
@KentaHizume KentaHizume restored the feature/npm-workspacesを導入する branch August 21, 2024 08:18
@KentaHizume KentaHizume reopened this Aug 21, 2024
@KentaHizume
Copy link
Contributor Author

@tsuna-can-se
下記の通り対応が完了いたしましたので、再度お目通しお願いいたします。
・アプリ名を作成するissueのタイトルに追加
・フロントエンドCIの名称がconsumerだとわかるようにリネーム
・ワークスペース名のcustomerからconsumerへのリネーム

ブランクプロジェクトの作成にワークスペースに関する記載を追加
@KentaHizume
Copy link
Contributor Author

@tsuna-can-se
お時間要しまして申し訳ありません、
ドキュメントの更新が完了いたしましたので、お目通しお願いいたします。
ダークモード版の画像につきましては画像の内容が固まってから作成いたします。

新規

変更

@tsuna-can-se
Copy link
Contributor

@KentaHizume
ファイルが競合しているようなので、解消をお願いします。
脆弱性のあるパッケージを更新した影響だと思うので、以下のPRの変更箇所についてはよく見ながらマージしてください。
#1708

@KentaHizume
Copy link
Contributor Author

@KentaHizume ファイルが競合しているようなので、解消をお願いします。 脆弱性のあるパッケージを更新した影響だと思うので、以下のPRの変更箇所についてはよく見ながらマージしてください。 #1708

@tsuna-can-se
package.jsonの競合を解消(micromatchについてmainを正としてマージ)し、動作に問題ないことを確認いたしました。

Copy link

Test Result 📝

Test was a success.
Completed in 33153ms with 209 passed, 0 failed and 0 skipped.

Coverage 📐

Summary
Generated on: 09/13/2024 - 00:59:12
Coverage date: 09/13/2024 - 00:58:51 - 09/13/2024 - 00:59:07
Parser: MultiReport (5x Cobertura)
Assemblies: 7
Classes: 120
Files: 119
Line coverage: 32.5% (1550 of 4765)
Covered lines: 1550
Uncovered lines: 3215
Coverable lines: 4765
Total lines: 9595
Branch coverage: 50.7% (202 of 398)
Covered branches: 202
Total branches: 398
Method coverage: Feature is only available for sponsors
Tag: 698_10841127055
Dressca.ApplicationCore - 91%
Name Line Branch
Dressca.ApplicationCore 91% 76.3%
Dressca.ApplicationCore.Accounting.Account 100% 100%
Dressca.ApplicationCore.Accounting.AccountItem 100%
Dressca.ApplicationCore.ApplicationCoreServicesExtensions 100%
Dressca.ApplicationCore.ApplicationService.AssetApplicationService 100% 70%
Dressca.ApplicationCore.ApplicationService.CatalogApplicationService 100% 50%
Dressca.ApplicationCore.ApplicationService.OrderApplicationService 100% 75%
Dressca.ApplicationCore.ApplicationService.ShoppingApplicationService 100% 78.5%
Dressca.ApplicationCore.ApplicationService.TransactionScopeManager 100% 100%
Dressca.ApplicationCore.Assets.Asset 94.4% 100%
Dressca.ApplicationCore.Assets.AssetNotFoundException 100%
Dressca.ApplicationCore.Assets.AssetTypes 100% 100%
Dressca.ApplicationCore.Baskets.Basket 100% 100%
Dressca.ApplicationCore.Baskets.BasketItem 84.2% 75%
Dressca.ApplicationCore.Baskets.CatalogItemNotExistingInBasketException 100%
Dressca.ApplicationCore.Catalog.CatalogBrand 84.6% 100%
Dressca.ApplicationCore.Catalog.CatalogCategory 84.6% 100%
Dressca.ApplicationCore.Catalog.CatalogDomainService 100% 66.6%
Dressca.ApplicationCore.Catalog.CatalogItem 54% 37.5%
Dressca.ApplicationCore.Catalog.CatalogItemAsset 92.8% 75%
Dressca.ApplicationCore.Catalog.CatalogItemNotExistingInRepositoryException 100%
Dressca.ApplicationCore.Events 100%
Dressca.ApplicationCore.Ordering.Address 100% 100%
Dressca.ApplicationCore.Ordering.CatalogItemOrdered 100% 100%
Dressca.ApplicationCore.Ordering.EmptyBasketOnCheckoutException 100%
Dressca.ApplicationCore.Ordering.NullBasketOnCheckoutException 100%
Dressca.ApplicationCore.Ordering.Order 100% 87.5%
Dressca.ApplicationCore.Ordering.OrderFactory 100%
Dressca.ApplicationCore.Ordering.OrderItem 88.2% 25%
Dressca.ApplicationCore.Ordering.OrderItemAsset 85.7% 75%
Dressca.ApplicationCore.Ordering.OrderNotFoundException 100%
Dressca.ApplicationCore.Ordering.ShipTo 100% 75%
Dressca.ApplicationCore.Resources.LogMessages 88.8% 100%
Dressca.ApplicationCore.Resources.Messages 71.6% 100%
Dressca.EfInfrastructure - 12%
Name Line Branch
Dressca.EfInfrastructure 12% 31.8%
Dressca.EfInfrastructure.Configurations.Assets.AssetConfiguration 100%
Dressca.EfInfrastructure.Configurations.Baskets.BasketConfiguration 100%
Dressca.EfInfrastructure.Configurations.Baskets.BasketItemConfiguration 100%
Dressca.EfInfrastructure.Configurations.Catalog.CatalogBrandConfiguration 100%
Dressca.EfInfrastructure.Configurations.Catalog.CatalogCategoryConfiguratio
n
100%
Dressca.EfInfrastructure.Configurations.Catalog.CatalogItemAssetConfigurati
on
100%
Dressca.EfInfrastructure.Configurations.Catalog.CatalogItemConfiguration 100%
Dressca.EfInfrastructure.Configurations.Ordering.OrderConfiguration 100%
Dressca.EfInfrastructure.Configurations.Ordering.OrderItemAssetConfiguratio
n
100%
Dressca.EfInfrastructure.Configurations.Ordering.OrderItemConfiguration 100%
Dressca.EfInfrastructure.DresscaDbContext 83.7% 50%
Dressca.EfInfrastructure.EfAssetRepository 0% 0%
Dressca.EfInfrastructure.EfBasketRepository 69.6% 50%
Dressca.EfInfrastructure.EfCatalogBrandRepository 0% 0%
Dressca.EfInfrastructure.EfCatalogCategoryRepository 0% 0%
Dressca.EfInfrastructure.EfCatalogRepository 92.3% 50%
Dressca.EfInfrastructure.EfInfrastructureServicesExtension 81.8% 50%
Dressca.EfInfrastructure.EfOrderRepository 100% 50%
Dressca.EfInfrastructure.Events 0%
Dressca.EfInfrastructure.HealthChecksBuilderExtensions 60%
Dressca.EfInfrastructure.Migrations.AddNowPrintingAsset 0%
Dressca.EfInfrastructure.Migrations.DresscaDbContextModelSnapshot 0%
Dressca.EfInfrastructure.Migrations.InitialCreate 0%
Dressca.EfInfrastructure.Resources.Messages 0% 0%
Dressca.Store.Assets.StaticFiles - 9.4%
Name Line Branch
Dressca.Store.Assets.StaticFiles 9.4% 0%
Dressca.Store.Assets.StaticFiles.Events 0%
Dressca.Store.Assets.StaticFiles.Resources.LogMessages 0% 0%
Dressca.Store.Assets.StaticFiles.StaticFileAssetStore 0% 0%
Dressca.Store.Assets.StaticFiles.StaticFileAssetStoreServicesExtension 100%
Dressca.SystemCommon - 88.3%
Name Line Branch
Dressca.SystemCommon 88.3% 90.9%
Dressca.SystemCommon.BusinessError 100% 83.3%
Dressca.SystemCommon.BusinessErrorCollection 88.8% 100%
Dressca.SystemCommon.BusinessException 93.7% 100%
Dressca.SystemCommon.ObjectExtensions 100% 50%
Dressca.SystemCommon.Resources.Messages 55.5% 100%
Dressca.SystemCommon.Text.Json.DefaultJsonSerializerOptions 100%
Dressca.Web - 42.6%
Name Line Branch
Dressca.Web 42.6% 27.2%
__OptionValidationGeneratedAttributes 0% 0%
__OptionValidationStaticInstances 0%
Dressca.Web.Assets.AssetExtensions 87.5% 50%
Dressca.Web.Baskets.BuyerIdFilterAttribute 96.5% 58.3%
Dressca.Web.Baskets.HttpContextExtensions 100% 100%
Dressca.Web.Configuration.CookieSettingsValidator 0% 0%
Dressca.Web.Configuration.CookieSettings 100% 100%
Dressca.Web.Configuration.ValidateWebServerOptions 0% 0%
Dressca.Web.Configuration.WebServerOptions 100%
Dressca.Web.Controllers.ActionNameHelper 75% 50%
Dressca.Web.Controllers.ApiModel.FindCatalogItemsQuery 0%
Dressca.Web.Controllers.AssetsController 0% 0%
Dressca.Web.Controllers.BasketItemsController 34.3% 37.5%
Dressca.Web.Controllers.CatalogBrandsController 0% 0%
Dressca.Web.Controllers.CatalogCategoriesController 0% 0%
Dressca.Web.Controllers.CatalogItemsController 0% 0%
Dressca.Web.Controllers.ErrorController 0% 0%
Dressca.Web.Controllers.OrdersController 88.2% 50%
Dressca.Web.Events 100%
Dressca.Web.HealthChecks.HealthCheckDescriptionProvider 7.8% 25%
Dressca.Web.Mapper.BasketItemMapper 0% 0%
Dressca.Web.Mapper.BasketMapper 9.5% 25%
Dressca.Web.Mapper.CatalogBrandMapper 0% 0%
Dressca.Web.Mapper.CatalogCategoryMapper 0% 0%
Dressca.Web.Mapper.CatalogItemMapper 0% 0%
Dressca.Web.Mapper.CatalogItemSummaryResponseMapper 0% 0%
Dressca.Web.Mapper.DtoMapperServicesExtension 100%
Dressca.Web.Mapper.OrderMapper 95.1% 50%
Dressca.Web.Resources.LogMessages 0% 0%
Dressca.Web.Resources.Messages 41.6% 100%
Dressca.Web.Runtime.BusinessExceptionDevelopmentFilter 100% 50%
Dressca.Web.Runtime.BusinessExceptionFilter 100% 50%
Dressca.Web.Runtime.BusinessExceptionFilterBase 100% 83.3%
Program 80.8% 75%
Dressca.Web.Dto - 45.5%
Name Line Branch
Dressca.Web.Dto 45.5% 0%
Dressca.Web.Dto.Accounting.AccountResponse 100%
Dressca.Web.Dto.Baskets.BasketItemResponse 0%
Dressca.Web.Dto.Baskets.BasketResponse 0%
Dressca.Web.Dto.Baskets.PostBasketItemsRequest 100%
Dressca.Web.Dto.Baskets.PutBasketItemsRequest 0%
Dressca.Web.Dto.Catalog.CatalogBrandResponse 0%
Dressca.Web.Dto.Catalog.CatalogCategoryResponse 0%
Dressca.Web.Dto.Catalog.CatalogItemResponse 0%
Dressca.Web.Dto.Catalog.CatalogItemSummaryResponse 100%
Dressca.Web.Dto.Ordering.OrderItemResponse 100%
Dressca.Web.Dto.Ordering.OrderResponse 100%
Dressca.Web.Dto.Ordering.PostOrderRequest 100%
Dressca.Web.Dto.PagedList`1 0% 0%
Maris.Logging.Testing - 94.2%
Name Line Branch
Maris.Logging.Testing 94.2% 100%
Maris.Logging.Testing.Xunit.TestLoggerManager 100% 100%
Maris.Logging.Testing.Xunit.XunitLogger 76.4% 100%
Maris.Logging.Testing.Xunit.XunitLoggerProvider 100% 100%
Microsoft.Extensions.DependencyInjection.TestLoggerServiceCollectionExtensi
ons
100%
Microsoft.Extensions.Logging.FakeLoggingBuilderExtensions 100%
Microsoft.Extensions.Logging.XunitLoggingBuilderExtensions 100%

@tsuna-can-se tsuna-can-se merged commit d365d96 into main Sep 13, 2024
5 checks passed
@tsuna-can-se tsuna-can-se deleted the feature/npm-workspacesを導入する branch September 13, 2024 04:51
@tsuna-can-se tsuna-can-se added ドキュメント改善 target: ガイド/AP開発手順 ドキュメントのガイド/アプリケーション開発手順に関係がある labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Github Actionsなどの修正 target: ガイド/AP開発手順 ドキュメントのガイド/アプリケーション開発手順に関係がある target: Dressca サンプルアプリケーションDresscaに関係がある
Projects
None yet
Development

Successfully merging this pull request may close these issues.

フロントエンドのフォルダ構成をnpm workspacesを導入したものに変更する
2 participants